<?php
/**
* Actions Map Add new/Edit
* @author: trungdt
* @since: feb 1, 2011
* @version: 1.0
* 
* Change logs
* feb 1, 2011 - trungdt - first create
* 
*/

if (!defined("EXPONENT")) exit("");
	$action = null;
	if (isset($_GET['id'])) {
		$action = $db->selectObject("action_maps","id=".intval($_GET['id']));
	}
	
	if (exponent_users_isAdmin() && exponent_users_isLoggedIn()) {
		$form = actions_map::form($action);
        $form->meta("action","actions_map_save");
		$form->meta("module","navigationmodule");
				
		$template = new template("navigationmodule","_actions_map_edit",$loc);
		$template->assign("is_edit",(isset($action->id) ? 1 : 0));
		$template->assign("form_html",$form->toHTML());
		$template->output();
	} else {
		echo exponent_http_error(403);
	}

?>